package com.ruoyi.controller;

import com.ruoyi.Vo.MyEntity;
import com.ruoyi.Vo.TableDataInfo;
import com.ruoyi.service.fanyuanlistService;
import com.ruoyi.utildao.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/fangyuan")
public class  FangyuanlistColler {
    @Autowired
    private fanyuanlistService wateraskService;
    //获取房源列表
    @GetMapping("/list")
    public TableDataInfo list(@RequestParam Map params) {
        List<Map<String, Object>> list=wateraskService.getfangyuanlist(params);
        TableDataInfo tableInfo = new TableDataInfo();
        tableInfo=util.Fenye(list,params,tableInfo);
        return tableInfo;
    }
    @GetMapping("/xiangqing")
    public List<Map<String, Object>> xaingqing(@RequestParam Map params) {
        List<Map<String, Object>> list=wateraskService.xaingqing(params);
        return list;
    }
}
